Skip to content

feat(plugins): add read-only lifecycle control plane - #44

Merged
phodal merged 3 commits into
mainfrom
feat/plugin-lifecycle-control-plane
Aug 4, 2026
Merged

feat(plugins): add read-only lifecycle control plane#44
phodal merged 3 commits into
mainfrom
feat/plugin-lifecycle-control-plane

Conversation

@phodal

@phodal phodal commented Aug 1, 2026

Copy link
Copy Markdown
Member

Summary

  • add typed, read-only plugin status, plugin plan, plugin verify, and doctor flows across eight supported hosts and eleven host surfaces
  • centralize validated host profiles, scope/provenance observations, fail-closed planning, native home bindings, and shell-neutral human output
  • keep Pi persistent and session-only loading distinct, isolate Codex CLI/Desktop evidence, and harden Qwen project-scope provenance
  • document the portable lifecycle contract in English and Chinese and add the implementation spec at docs/specs/2026-07-31-better-harness-plugin-lifecycle.md

Why

Lifecycle evidence and mutation planning previously depended on provider-specific assumptions that could borrow discovery, scope, or installation state across surfaces. This change introduces a shared read-only control plane so callers can inspect and plan against explicit evidence without executing host mutations.

Impact

Users and automation can query normalized status, verification, doctor, and deterministic plan envelopes. Unknown, mixed, foreign, or unbound host state fails closed. plugin apply remains intentionally unregistered, so Better Harness does not execute lifecycle mutations.

Validation

  • npm test — 1163/1163 passed
  • node --test test/doc-link-graph.test.mjs — 6/6 passed
  • npm run pack:verify — 401 npm entries and 424 runtime zip entries
  • isolated public CLI smoke — eight doctor targets, eleven lifecycle rows, ready Qwen project install plan, and no real HOME leakage
  • git diff origin/main...HEAD --check

Risk and follow-up

The native help fixture is contract evidence rather than live cross-platform acceptance. Real Codex Desktop, Pi same-session, and Windows host smoke remain follow-up validation boundaries.

phodal and others added 2 commits August 1, 2026 10:27
Add typed status, plan, verify, and doctor flows across supported host surfaces, with scope-safe observations, fail-closed plans, and isolated home bindings. Split Pi persistent and session-only behavior and document the portable host contracts.

Implements docs/specs/2026-07-31-better-harness-plugin-lifecycle.md. Validation covers npm test (1163/1163), the documentation link graph (6/6), pack verification (401 npm entries and 424 runtime zip entries), and isolated public CLI smoke checks.

Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
…lane

Bring the read-only plugin lifecycle branch up to date with main, which grew
the Kimi Code and Grok adapters, the host capability registry under
scripts/host-support/, the simplified issue templates, the Cursor Canvas
default output, and the README "More adapters" consolidation.

Conflict resolutions:
- scripts/host-support/index.mjs keeps main's capability registry and adds the
  lifecycle profile facade beside it, so capability slices and lifecycle
  profiles stay separate concerns behind one host-support entry point.
- The lifecycle profile suite moves to test/host-support-profiles.test.mjs so
  main's capability-registry suite keeps test/host-support.test.mjs.
- Issue-template, Cursor Canvas, and README host-section changes follow main;
  the Cursor adapter row keeps the cursor-canvas output with the native
  cursor-agent help contract chain, and the Pi single-run guidance assertion
  now targets the Host Adapter Matrix instead of the trimmed README.
- Lifecycle profiles stay at the eight hosts the spec validated. Kimi Code and
  Grok have no native lifecycle contract yet, so plugin and doctor targets
  reject them with UNKNOWN_HOST; the spec non-goals, adapter docs, and a
  target-resolution test record that boundary.

Fixes surfaced by CI on the stale branch:
- plugin plan tests stubbed host executables on PATH instead of depending on
  whichever host CLI happens to be installed, which is why "plugin plan emits
  typed argv" and the isolated/stale plan test failed on every CI runner.
- Dropped the explicit node:process imports from the lifecycle and doctor CLIs;
  building that builtin's ESM facade touched process.stdin and broke the
  leaf-help zero-side-effect guard for doctor --help.
- Refreshed the frozen commands/schema digests for the new plugin and doctor
  entries.

Validation: npm test (1263/1263) and npm run pack:verify (447 npm entries,
469 runtime zip entries) on macOS.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
@phodal
phodal marked this pull request as ready for review August 4, 2026 11:34
The Windows CI job failed on four assertions that assumed POSIX paths:

- doctor host-home leak checks built a regular expression from a raw temp path,
  which is an invalid pattern once it contains backslashes; they now compare
  JSON-escaped path text instead.
- the cross-capability import guard compared a platform-separated relative path
  against a slash-separated literal, so the registry metadata projection looked
  like a violation.
- the plan binding test compared resolved plan targets against unresolved POSIX
  fixture strings, which gain a drive prefix on Windows.

Validation: npm test (1263/1263) on macOS; the Windows job is the real gate.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
@phodal
phodal merged commit 1f0d943 into main Aug 4, 2026
4 checks passed
@phodal
phodal deleted the feat/plugin-lifecycle-control-plane branch August 4, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant